<?php

$c = array(
	'I18N' => array(
		'name' => 'Internationlization',
		'description' => '[FIXME]',
		'v' => array(
			'UTF8_SUPPORT' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => TRUE,
				'export' => TRUE,
				'effect' => array(
					'Set UTF8 as default client encoding and DB encoding',
					'Configure the database link on each new connection to use utf8 as connection-charset',
					'Set the default-charset apache property to send back UTF8 HTTP header in case it\'s not overriden in the php scripts',
					'Do not set this property in case of an Ajax call to avoid a JS parser failure in IE6 and IE7',
					),
				'remarks' => array(
					'Not tested with something else than MySQL as database server',
					'Integrated with DB_DataObject only (need to see for propel)',
					'Working with MDB2 and DB',
					),
				),
			'DEFAULT_LANGUAGE' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::STRING,
				'value' => 'en',
				'export' => TRUE,
				'effect' => array(
					'Defines the default language code to use in case the user doesn\'t have any',
					),
				'remarks' => array(
					'saved in a cookie on the first visit',
					),
				),
			'SMARTY_LANGUAGE_RESOURCE' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'export' => TRUE,
				'effect' => array(
					'Automatically load configuration files for language constants',
					'One language file per template',
					'The language file must have the exact same name as the template with ".ini" appended to it',
					'The language file follow the ".ini" file format',
					'Section must have language code (two letters) as name',
					'Global section defines default values for the language constants',
					),
				'remarks' => array(
					'Not tested with non-file templates, but should be working the same way',
					'Multiple inclusion of template and language constants scope is handled correctly',
					'Use a hack for stacking language constants in Smarty config stack, need to check carefully against future updates of smarty lib',
					),
				),
			'DEFAULT_LANGUAGE_PARAMETER_NAME' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::STRING,
				'value' => 'language',
				'export' => TRUE,
				'effect' => array(
					'Defines the name of the reserved parameter for changing the application language',
					'Then, any user calling http:// mywebsite/any/path/DEFAULT_LANGUAGE_PARAMETER_NAME/fr/any/other/params is changing his language to fr',
					),
				'remarks' => array(
					'In case the language is changed, a new cookie is issued to the user',
					),
				),
			'AUTHORIZED_LANGUAGES' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::ARRAY_ASSOC,
				'key_description' => 'country code',
				'val_description' => 'country name',
				'value' => array(),
				'effect' => array(
					'Defines the list of acceptable language the user may select',
					),
				'remarks' => array(
					'The original language selection (default language) is not affected by this variable',
					),
				),
			'TIMEZONE' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::STRING,
				'value' => 'Asia/Saigon',
				'effect' => array(
					'Set the timezone for all php date() call',
					'Set also the timezone for the database connection (maintain consistency for NOW() function)',
					),
				'remarks' => array(
					'must be supported by php, check against the list at http://vn.php.net/manual/en/timezones.php',
					),
				),
			),
		),
	'SESSION' => array(
		'name' => 'Session',
		'description' => '[FIXME]',
		'v' => array(
			'HANDLER_TYPE' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::ENUM,
				'export' => TRUE,
				'enum_values' => array('SERVER', 'DATABASE'),
				'value' => 'SERVER',
				'effect' => array(
					'[FIXME]',
					),
				),
			'AUTOSTART' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::BOOL,
				'export' => TRUE,
				'value' => FALSE,
				'effect' => array(
					'if set to true, the framework will start the session automatically at the beginning of the script',
					'Otherwise, the session will start only with the first use of the session',
					),
				'remarks' => array(
					'It can be faster to load only the session on demand, especially if the session contains lot of data or is stored on external storage.',
					),
				),
			),
		),
	'APPLICATION' => array(
		'name' => 'Application',
		'description' => '[FIXME]',
		'v' => array(
			'NAME' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::STRING,
				'value' => 'app',
				'export' => TRUE,
				'effect' => array(
					'defines the name of the application',
					'Is used to define the session name',
					'Is used in the log lines',
					),
				),
			'URL' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::STRING,
				'value' => '',
				'export' => TRUE,
				'effect' => array(
					'defines the absolute or relative URL of the application',
					'should not contain a trailing slash',
					),
				),
			'DEFAULT_CONTROLLER' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::STRING,
				'value' => 'index',
				'export' => TRUE,
				'effect' => array(
					'[FIXME]',
					),
				),
			'DEFAULT_ACTION' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::STRING,
				'value' => 'index',
				'export' => TRUE,
				'effect' => array(
					'[FIXME]',
					),
				),
			),
		),
	'FS' => array(
		'name' => 'File system',
		'description' => '[FIXME]',
		'v' => array(
			'USE_LOWERCASE_FILENAMES' => array(
				'status' => FRM_Config::DEV,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'export' => TRUE,
				'effect' => array(
					'Assume filenames for class definitions are stored in lowercase in the fs',
					),
				'remarks' => array(
					'Should avoid a lot of not-so-easy-to-debug problems when switching platform (windows/linux) or using Ajax',
					'Still in development',
					'If the advantages of using it are proven, the feature will be integrated directly in the framework, without configuration',
					),
				),
			'TEMPLATE_DIR' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::PATH,
				'value' => APPLICATION_DIR.'/view/templates',
				'effect' => array(
					'[FIXME]',
					),
				),
			'TEMPLATE_C_DIR' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::PATH,
				'path_writable' => TRUE,
				'value' => APPLICATION_DIR.'/view/templates_pub',
				'effect' => array(
					'[FIXME]',
					),
				),
			),
		),
	'DB' => array(
		'name' => 'Database',
		'description' => '[FIXME]',
		'v' => array(
			'DRIVER' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::ENUM,
				'enum_values' => array('MDB2', 'DB'),
				'value' => 'MDB2',
				'export' => TRUE,
				'effect' => array(
					'defines the PEAR DB driver to use with DB dataobject',
					),
				'remarks' => array(
					'MDB2 is warmly recommended',
					),
				),
			'DSN' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::ARRAY_ASSOC,
				'key_description' => 'Database identifier (begins with database_)',
				'val_description' => 'Database connection string (don\'t forget the newlink if needed)',
				'value' => array(),
				'effect' => array(
					'Defines the list of databases used by the ORM',
					),
				'remarks' => array(
					'[FIXME]',
					),
				),
			),
		),
	'STATIC' => array(
		'name' => 'Static content',
		'description' => '[FIXME]',
		'v' => array(
			'COMPONENT_VERSION' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::STRING,
				'value' => 'source',
				'export' => TRUE,
				'effect' => array(
					'Defines the component version for static files, ie, the folder from which resources will be loaded',
					),
				'remarks' => array(
					'The only use of this constant is for construction the APP_COMPONENT_URL',
					),
				),
			'COMPONENT_URL' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::STRING,
				'value' => "FRM_Config::get('APPLICATION','URL').'/static/'.FRM_Config::get('STATIC','COMPONENT_VERSION')",
				'eval' => TRUE,
				'export' => TRUE,
				'effect' => array(
					'Defines the url to access to static resources in the application',
					),
				'remarks' => array(
					'This constant should always be constructed using FRM::STATIC_COMPONENT_VERSION',
					),
				),
			),
		),
	'LOG' => array(
		'name' => 'Logging',
		'description' => '[FIXME]',
		'v' => array(
			'FACILITY' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::ENUM,
				'enum_values' => array('null' , 'syslog' , 'mail' , 'file' , 'display' , 'firebug'),
				'value' => 'null',
				'effect' => array(
					'Set the handler for log messages. See documentation of PEAR::Log here for more info',
					),
				'remarks' => array(
					'More handler than the ones given here are available. However, stick to the previous list for safety and code compat reasons',
					'"syslog" is highly recommanded for production server',
					'"firebug" should be the preferred handler for development workstation',
					),
				),
			'PARAM' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::STRING,
				'value' => '',
				'effect' => array(
					'Defines the parameter for the logger construction.',
					'Relevant only for logger \'file\' where it defines the name of the file to log to',
					'And in logger \'mail\' where it is the destination email',
					),
				),
			'ENABLE_ORM_LOG' => array(
				'status' => FRM_Config::BETA,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate a generic logging behaviour for all DataObject in the application',
					),
				'remarks' => array(
					'Use in conjonction with LOG_ENABLE_DEBUG or LOG_ENABLE_ERR',
					),
				),
			'MAX_SQL_QUERY_LENGTH' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::INT,
				'value' => 300,
				'effect' => array(
					'Defines the maximum length in bytes for SQL queries logged in the ORM',
					),
				'remarks' => array(
					'[FIXME]',
					),
				),
			'ENABLE_DEBUG' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'ENABLE_INFO' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'ENABLE_NOTICE' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'ENABLE_WARNING' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'ENABLE_ERR' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'ENABLE_CRIT' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'ENABLE_ALERT' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'ENABLE_EMERG' => array(
				'status' => FRM_Config::STABLE,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'activate or not the specified level in the log',
					),
				),
			'SILENCE' => array(
				'status' => FRM_Config::DEV,
				'type' => FRM_Config::BOOL,
				'value' => FALSE,
				'effect' => array(
					'Doesn\'t deactivate the log, but avoid anything to be outputted to the standard output',
					),
				),
			),
		),
	'REQUEST' => array(
			'name' => 'Request',
			'description' => '[FIXME]',
			'v' => array(
				'PARAM_ORDER' => array(
					'status' => FRM_Config::STABLE,
					'type' => FRM_Config::STRING,
					'value' => 'GPA',
					'export' => TRUE,
					'effect' => array(
						'defines the order in which to construct the parameters array from the various input flows of a request',
						),
					'remarks' => array(
						'G stands for GET, P for POST, A for URL user arguments and C for command line (argv arguments)',
	 					'Knowing that the last will override parameters with the same name, it can be useful to tweak the order under some conditions',
						'Note that the code is optimized for default loading scheme (GPA)',
						),
					),
				'CLI' => array(
					'status' => FRM_Config::STABLE,
					'type' => FRM_Config::BOOL,
					'value' => FALSE,
					'export' => TRUE,
					'effect' => array(
						'No effect',
						),
					'remarks' => array(
						'Used internally only to store in the config the SAPI originating the call',
						),
					),
				),
			),
	'MAIL' => array(
			'name' => 'Mail',
			'description' => '[FIXME]',
			'v' => array(
				'SMTP_HOST' => array(
					'status' => FRM_Config::BETA,
					'type' => FRM_Config::STRING,
					'value' => '',
					'effect' => array(
						'[FIXME]',
						),
					'remarks' => array(
						'[FIXME]',
						),
					),
				'SMTP_USER' => array(
					'status' => FRM_Config::BETA,
					'type' => FRM_Config::STRING,
					'value' => '',
					'effect' => array(
						'[FIXME]',
						),
					'remarks' => array(
						'[FIXME]',
						),
					),
				'SMTP_PASS' => array(
					'status' => FRM_Config::BETA,
					'type' => FRM_Config::STRING,
					'value' => '',
					'effect' => array(
						'[FIXME]',
						),
					'remarks' => array(
						'[FIXME]',
						),
					),
				),
			),
		);
